package top.kaoshanji.r2ch07d;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 代码清单-r2ch07d-02：验证一下环绕增强
 * @author kaoshanji
 * ^_^
 * create time 2025/5/7 17:09
 */
public class GreetingAroundContext {

    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("r2ch07d/greeting-around-beans.xml");
        Waiter waiter = (Waiter) context.getBean("waiter");

        waiter.greetTo("John");

        System.out.println("=======================");

        waiter.serveTo("Tom");

    }

}
